Overview

This document contains some analysis of the previously cleaned seed data.

This analysis was performed using R version 4.4.1 (2024-06-14 ucrt). The tidyverse suite of packages was used for data manipulation and visualisation. The emmeans package was used for model predictions.

Data Loading

The cleaned data is read in. There is the full dataset followed by the dataset that has been summarised (over the unbalanced reps).


## tibble [4,315 × 16] (S3: tbl_df/tbl/data.frame)
##  $ Year                    : Factor w/ 3 levels "2021-2022","2022-2023",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Farm                    : Factor w/ 19 levels "Ahuriri","Ashford 1",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ Property_Grouping       : Factor w/ 18 levels "Ahuriri","Ashford_1",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ PK_Boundary             : Factor w/ 10 levels "Bare_fence","Control_farm",..: 1 1 1 1 1 1 1 2 2 2 ...
##  $ Simplified_Boundary     : Factor w/ 4 levels "Old native","New native",..: 3 3 3 3 3 3 3 4 4 4 ...
##  $ Very_Simplified_Boundary: Factor w/ 2 levels "Bare_fence","Mixed_native": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Planting_date           : chr [1:4315] "*" "*" "*" "*" ...
##  $ Treatment               : Factor w/ 3 levels "Hand pollinated",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Colour                  : logi [1:4315] NA NA NA NA NA NA ...
##  $ Rep                     : num [1:4315] 2 2 2 2 1 1 1 2 2 2 ...
##  $ Number_of_Pods          : chr [1:4315] "10" "10" "10" "10" ...
##  $ Pod_number              : chr [1:4315] "7" "10" "3" "1" ...
##  $ Seed viable             : num [1:4315] 13 12 12 10 13 15 16 16 11 12 ...
##  $ Seed inviable           : num [1:4315] 0 0 1 0 0 0 0 0 0 0 ...
##  $ Native_new_age          : Factor w/ 6 levels "Old native","Three-year old native",..: 5 5 5 5 5 5 5 6 6 6 ...
##  $ Type_of_farm            : Factor w/ 2 levels "Arable","Dairy": 2 2 2 2 2 2 2 2 2 2 ...


Next the previously saved summarised data is loaded.


## tibble [319 × 7] (S3: tbl_df/tbl/data.frame)
##  $ Year               : Factor w/ 3 levels "2021-2022","2022-2023",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Farm               : Factor w/ 19 levels "Ahuriri","Ashford 1",..: 1 1 1 1 1 2 2 2 2 2 ...
##  $ Type_of_farm       : Factor w/ 2 levels "Arable","Dairy": 1 1 1 1 1 2 2 2 2 2 ...
##  $ Simplified_Boundary: Factor w/ 4 levels "Old native","New native",..: 2 2 2 4 4 2 2 2 4 4 ...
##  $ Native_new_age     : Factor w/ 6 levels "Old native","Three-year old native",..: 4 4 4 6 6 4 4 4 6 6 ...
##  $ Treatment          : Factor w/ 3 levels "Hand pollinated",..: 1 2 3 1 2 1 2 3 1 2 ...
##  $ Mean_seeds_viable  : num [1:319] 16.2 14.8 1 16.2 10.4 ...


Next we further summarise the data and calculate the means for each Year, Simplified_Boundary and Treatment combination (the black dots in the second and third graphs below).

Graphs

With the farms shown


The details of the particular farms is not of interest so we remove this information and add the overall means to the plots.

With the overall raw means

The two plots below are the same, just with minor differences (HP abbreviation and the size of the points).



Dairy or Arable added to the graphs

First we look at the data in a single graph and then with the farm types separated.


Modelling

Comments

  • We remove the Control farms and the Closed treatment so we can see if there is a difference between HP and Open.
  • Fitting a zero-inflated model with the Closed treatment data included did not converge. Since this was not the “main comparison of interest” I did not spend a lot time trying to make it work.
  • The data is separated into Arable and Dairy for modelling purposes.
  • Again I ran into problems with trying to fit a single model.

Model descriptions

We fit linear mixed-effect models to the two sets of data. The response is Mean_seeds_viable. The fixed-effects are Treatment and Simplified_Boundary plus their two-way interaction. Year is not really of interest (I hope?) so we make it a random effect. There is also a random effect for Farm nested in Year. This means that there are 3 levels to the Year random effect, and 24 for the Farm:Year random effect (and it doesn’t matter that we don’t have data from every farm for each year).

Graphs of data used in models

Results Arable farms

Two outliers were removed from the data to better satisfy modelling assumptions.

If the outliers are included in the model, the story is the same (results not shown).

The ANOVA table is:


Chisq Df Pr(>Chisq)
Treatment 62.48919 1 0.000000
Simplified_Boundary 17.71436 2 0.000142
Treatment:Simplified_Boundary 14.18787 2 0.000830


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table. Note that the post-hoc pairwise comparison p-values were adjusted using the False Discovery Rate (FDR) correction to account for multiple tests.


Simplified_Boundary Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.13 9.54 24.71
New native Hand pollinated 17.98 10.54 25.42
Bare fence Hand pollinated 16.98 9.83 24.13
Old native Open 15.73 8.14 23.31
New native Open 15.37 7.79 22.94
Bare fence Open 12.33 5.34 19.31


## Treatment = Hand pollinated:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native   -0.854 0.696 61.2  -1.227  0.3366
##  Old native - Bare fence    0.147 0.612 43.7   0.240  0.8115
##  New native - Bare fence    1.001 0.745 61.5   1.343  0.3366
## 
## Treatment = Open:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    0.361 0.685 60.7   0.528  0.5995
##  Old native - Bare fence    3.402 0.635 44.0   5.359  <.0001
##  New native - Bare fence    3.040 0.752 61.7   4.043  0.0002
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 3 tests


The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated. For Open the New native and Old native each have approximately 3 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.

Results Dairy farms

The ANOVA table is:


Chisq Df Pr(>Chisq)
Simplified_Boundary 25.565 2 0.000
Treatment 32.257 1 0.000
Simplified_Boundary:Treatment 9.679 2 0.008


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table.


Simplified_Boundary Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.68 10.29 25.07
New native Hand pollinated 17.37 11.46 23.29
Bare fence Hand pollinated 16.64 9.81 23.48
Old native Open 16.43 9.04 23.82
New native Open 15.11 9.20 21.03
Bare fence Open 12.30 5.46 19.13


## Treatment = Hand pollinated:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    0.303 0.896 79.5   0.338  0.7363
##  Old native - Bare fence    1.033 0.719 67.8   1.437  0.4664
##  New native - Bare fence    0.730 0.935 77.1   0.781  0.6559
## 
## Treatment = Open:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    1.315 0.896 79.5   1.467  0.1464
##  Old native - Bare fence    4.132 0.719 67.8   5.747  <.0001
##  New native - Bare fence    2.818 0.935 77.1   3.014  0.0052
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 3 tests


The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated.

For Open, the New native have approximately 3 more viable seeds on average than the Bare fence. The Old native have approximately 4 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.

UPDATED Modelling (‘New Native’ & Year one-to-one relationship)

We repeat the above with ‘one year native’ and ‘two year native’ in 2023-2024 removed. So ‘New native’ only has

  • One year old in 2021-2022
  • Two year old in 2022-2023
  • Three year old in 2023-2024

Note that is data is all from Arable farms (Garrickfield and Limbrick).

Tables of counts before and after the four extra observations are removed are below:

##            
##             Old native Three-year old native Two-year old native
##   2021-2022         24                     0                   0
##   2022-2023         24                     0                  14
##   2023-2024         20                    14                   2
##            
##             One-year old native On-farm bare fence
##   2021-2022                  12                 20
##   2022-2023                   0                 20
##   2023-2024                   2                 12
##            
##             Old native Three-year old native Two-year old native
##   2021-2022         24                     0                   0
##   2022-2023         24                     0                  14
##   2023-2024         20                    14                   2
##            
##             One-year old native On-farm bare fence
##   2021-2022                  12                 20
##   2022-2023                   0                 20
##   2023-2024                   2                 12

Model descriptions

We fit linear mixed-effect models to the two sets of data. The response is Mean_seeds_viable. The fixed-effects are Treatment and Simplified_Boundary plus their two-way interaction. Year is not really of interest (I hope?) so we make it a random effect. There is also a random effect for Farm nested in Year. This means that there are 3 levels to the Year random effect, and 24 for the Farm:Year random effect (and it doesn’t matter that we don’t have data from every farm for each year).

Graphs of data used in models

Results Arable farms

Two outliers were removed from the data to better satisfy modelling assumptions.

If the outliers are included in the model, the story is the same (results not shown).

The ANOVA table is:


Chisq Df Pr(>Chisq)
Treatment 62.48919 1 0.000000
Simplified_Boundary 17.71436 2 0.000142
Treatment:Simplified_Boundary 14.18787 2 0.000830


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table. Note that the post-hoc pairwise comparison p-values were adjusted using the False Discovery Rate (FDR) correction to account for multiple tests.


Simplified_Boundary Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.13 9.54 24.71
New native Hand pollinated 17.98 10.54 25.42
Bare fence Hand pollinated 16.98 9.83 24.13
Old native Open 15.73 8.14 23.31
New native Open 15.37 7.79 22.94
Bare fence Open 12.33 5.34 19.31


## Treatment = Hand pollinated:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native   -0.854 0.696 61.2  -1.227  0.3366
##  Old native - Bare fence    0.147 0.612 43.7   0.240  0.8115
##  New native - Bare fence    1.001 0.745 61.5   1.343  0.3366
## 
## Treatment = Open:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    0.361 0.685 60.7   0.528  0.5995
##  Old native - Bare fence    3.402 0.635 44.0   5.359  <.0001
##  New native - Bare fence    3.040 0.752 61.7   4.043  0.0002
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 3 tests


The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated. For Open the New native and Old native each have approximately 3-4 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.

Results Dairy farms (unchanged)

The ANOVA table is:


Chisq Df Pr(>Chisq)
Simplified_Boundary 25.565 2 0.000
Treatment 32.257 1 0.000
Simplified_Boundary:Treatment 9.679 2 0.008


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table.


Simplified_Boundary Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.68 10.29 25.07
New native Hand pollinated 17.37 11.46 23.29
Bare fence Hand pollinated 16.64 9.81 23.48
Old native Open 16.43 9.04 23.82
New native Open 15.11 9.20 21.03
Bare fence Open 12.30 5.46 19.13


## Treatment = Hand pollinated:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    0.303 0.896 79.5   0.338  0.7363
##  Old native - Bare fence    1.033 0.719 67.8   1.437  0.4664
##  New native - Bare fence    0.730 0.935 77.1   0.781  0.6559
## 
## Treatment = Open:
##  contrast                estimate    SE   df t.ratio p.value
##  Old native - New native    1.315 0.896 79.5   1.467  0.1464
##  Old native - Bare fence    4.132 0.719 67.8   5.747  <.0001
##  New native - Bare fence    2.818 0.935 77.1   3.014  0.0052
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 3 tests


The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated.

For Open, the New native have approximately 3 more viable seeds on average than the Bare fence. The Old native have approximately 4 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.

NEW Modelling with Age of New Natives

Model descriptions

We fit linear mixed-effect models to the two sets of data. The response is Mean_seeds_viable. The fixed-effects are Treatment and Native_new_age plus their two-way interaction. Year is random effect. There is also a random effect for Farm nested in Year. This means that there are 3 levels to the Year random effect, and 24 for the Farm:Year random effect (and it doesn’t matter that we don’t have data from every farm for each year).

Results Arable farms

Two outliers were removed from the data to better satisfy modelling assumptions.

If the outliers are included in the model, the story is the same (results not shown).

The ANOVA table is:


Chisq Df Pr(>Chisq)
Treatment 67.37892 1 0.000000
Native_new_age 20.21447 4 0.000453
Treatment:Native_new_age 21.35846 4 0.000269


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table. Note that the post-hoc pairwise comparison p-values were adjusted using the False Discovery Rate (FDR) correction to account for multiple tests.


Native_new_age Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.05 5.98 28.12
Three-year old native Hand pollinated 17.99 10.92 25.05
Two-year old native Hand pollinated 16.78 9.10 24.46
One-year old native Hand pollinated 19.42 12.22 26.63
On-farm bare fence Hand pollinated 16.92 6.55 27.28
Old native Open 15.65 4.58 26.72
Three-year old native Open 16.21 9.15 23.28
Two-year old native Open 15.23 7.19 23.27
One-year old native Open 14.89 7.68 22.10
On-farm bare fence Open 12.26 2.17 22.35


## Treatment = Hand pollinated:
##  contrast                                        estimate    SE   df t.ratio
##  Old native - (Three-year old native)              -0.936 1.130 35.2  -0.828
##  Old native - (Two-year old native)                 0.272 0.950 54.8   0.286
##  Old native - (One-year old native)                -2.373 1.099 36.8  -2.160
##  Old native - (On-farm bare fence)                  0.135 0.588 41.1   0.229
##  (Three-year old native) - (Two-year old native)    1.208 1.386 46.7   0.872
##  (Three-year old native) - (One-year old native)   -1.437 1.428 34.8  -1.006
##  (Three-year old native) - (On-farm bare fence)     1.071 1.155 37.0   0.927
##  (Two-year old native) - (One-year old native)     -2.645 1.379 49.2  -1.917
##  (Two-year old native) - (On-farm bare fence)      -0.137 0.990 55.1  -0.139
##  (One-year old native) - (On-farm bare fence)       2.507 1.126 38.8   2.228
##  p.value
##   0.5904
##   0.8902
##   0.1870
##   0.8902
##   0.5904
##   0.5904
##   0.5904
##   0.2034
##   0.8902
##   0.1870
## 
## Treatment = Open:
##  contrast                                        estimate    SE   df t.ratio
##  Old native - (Three-year old native)              -0.563 1.130 35.2  -0.498
##  Old native - (Two-year old native)                 0.423 0.910 57.5   0.464
##  Old native - (One-year old native)                 0.761 1.099 36.8   0.693
##  Old native - (On-farm bare fence)                  3.392 0.610 41.3   5.557
##  (Three-year old native) - (Two-year old native)    0.985 1.360 43.8   0.724
##  (Three-year old native) - (One-year old native)    1.324 1.428 34.8   0.927
##  (Three-year old native) - (On-farm bare fence)     3.954 1.162 37.5   3.403
##  (Two-year old native) - (One-year old native)      0.339 1.353 46.3   0.250
##  (Two-year old native) - (On-farm bare fence)       2.969 0.967 56.9   3.071
##  (One-year old native) - (On-farm bare fence)       2.631 1.133 39.3   2.323
##  p.value
##   0.7157
##   0.7157
##   0.7041
##   <.0001
##   0.7041
##   0.7041
##   0.0080
##   0.8035
##   0.0109
##   0.0637
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 10 tests


The table above shows pairwise Native_new_age comparisons for each of the Treatments. There are no differences for Hand pollinated. For Open, the ‘Two-year old native’, ‘Three-year old native’ and ‘Old native’ each have 3-4 more viable seeds on average than ‘On-farm bare fence’. There are other statistically significant differences.

Results Dairy farms

The ANOVA table is:


Chisq Df Pr(>Chisq)
Treatment 36.19456 1 0.000000
Native_new_age 33.07631 4 0.000001
Treatment:Native_new_age 17.25479 4 0.001725


The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table.


Native_new_age Treatment Predicted mean lower.CL upper.CL
Old native Hand pollinated 17.63 8.57 26.68
Three-year old native Hand pollinated 19.39 13.83 24.96
Two-year old native Hand pollinated 14.20 8.62 19.77
One-year old native Hand pollinated 18.20 12.63 23.77
On-farm bare fence Hand pollinated 16.53 8.36 24.71
Old native Open 16.38 7.32 25.43
Three-year old native Open 16.07 10.51 21.63
Two-year old native Open 15.26 9.69 20.83
One-year old native Open 13.68 8.10 19.25
On-farm bare fence Open 12.18 4.01 20.36


## Treatment = Hand pollinated:
##  contrast                                        estimate    SE   df t.ratio
##  Old native - (Three-year old native)              -1.766 1.404 74.5  -1.258
##  Old native - (Two-year old native)                 3.430 1.381 76.6   2.483
##  Old native - (One-year old native)                -0.571 1.381 76.6  -0.413
##  Old native - (On-farm bare fence)                  1.093 0.681 63.2   1.606
##  (Three-year old native) - (Two-year old native)    5.197 1.901 76.2   2.734
##  (Three-year old native) - (One-year old native)    1.195 1.901 76.2   0.629
##  (Three-year old native) - (On-farm bare fence)     2.860 1.439 72.2   1.987
##  (Two-year old native) - (One-year old native)     -4.002 1.876 77.5  -2.133
##  (Two-year old native) - (On-farm bare fence)      -2.337 1.396 76.0  -1.674
##  (One-year old native) - (On-farm bare fence)       1.664 1.396 76.0   1.192
##  p.value
##   0.2962
##   0.0760
##   0.6804
##   0.1889
##   0.0760
##   0.5904
##   0.1267
##   0.1203
##   0.1889
##   0.2962
## 
## Treatment = Open:
##  contrast                                        estimate    SE   df t.ratio
##  Old native - (Three-year old native)               0.307 1.404 74.5   0.219
##  Old native - (Two-year old native)                 1.120 1.381 76.6   0.811
##  Old native - (One-year old native)                 2.701 1.381 76.6   1.955
##  Old native - (On-farm bare fence)                  4.193 0.681 63.2   6.158
##  (Three-year old native) - (Two-year old native)    0.813 1.901 76.2   0.428
##  (Three-year old native) - (One-year old native)    2.394 1.901 76.2   1.260
##  (Three-year old native) - (On-farm bare fence)     3.886 1.439 72.2   2.701
##  (Two-year old native) - (One-year old native)      1.581 1.876 77.5   0.843
##  (Two-year old native) - (On-farm bare fence)       3.073 1.396 76.0   2.201
##  (One-year old native) - (On-farm bare fence)       1.492 1.396 76.0   1.068
##  p.value
##   0.8276
##   0.5249
##   0.1355
##   <.0001
##   0.7444
##   0.4233
##   0.0431
##   0.5249
##   0.1026
##   0.4812
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: fdr method for 10 tests


The table above shows pairwise Native_new_age comparisons for each of the Treatments. There is no difference for ‘Hand pollinated’.

For Open, ‘Old native’ and ‘Three-year old native’ each have 4 more viable seeds on average than the ‘On-face bare fence’. There are no other statistically different pairs.